<template>
  <div class="kComponent cell-group">
    <uni-list>
      <uni-list-item 
        v-for="(item, index) in style.cells" 
        :key="index"
        :title="item.title" 
        :note="item.note"
        :thumb="item.icon"
        :rightText="item.rightText"
        clickable
        @click="handleClick(item)"
      />
    </uni-list>
  </div>
</template>

<script>
export default {
  name: 'WdCellGroup',
  props: {
    datas: Object,
  },
  data() {
    return {
      style: this.datas.setStyle || {
        cells: []
      }
    }
  },
  methods: {
    handleClick(item) {
      if (item.url) {
        window.location.href = item.url
      }
    }
  }
}
</script>

<style scoped lang="scss">
.cell-group {
  ::v-deep .uni-list {
    margin: 0;
    padding: 0;
  }
}
</style>
